/*
 * TableModel.java
 *
 * This class defines the table model for tables
 * used  in the GUI.
 *
 * Created on Apr 30, 2011, 8:59:18 PM
 */

package gui;
import javax.swing.table.*;

/**
 *
 * @author Sarah Wegner & Gabrielle DuBois
 */

    class MainTableModel extends DefaultTableModel {
        private String[] colNames;
        private Object[][] rowData;
        MainTableModel(Object[][] rowData, String[] colNames){
            super(rowData, colNames);
            this.colNames = colNames;
            this.rowData = rowData;
        }

        @Override
        public Class getColumnClass(int columnIndex) {
            return getValueAt(0, columnIndex).getClass();
        }

        @Override
        public String getColumnName(int col) {
            return colNames[col];
        }

        @Override
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return false;
        }

    }